/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>
#include "sle_seek_service.h"
#include "cmd_input.h"
#include <vector>
#include <memory>
#include <cstring>
#include <iterator>

namespace OHOS {
namespace NearLink {
namespace SleStandard {
namespace {
using namespace testing::ext;
SleSeekService *seekService_ = nullptr;
} // namespace

class SeekHandlerTest : public testing::Test {
public:
    static void SetUpTestCase();
    static void TearDownTestCase();
    void SetUp();
    void TearDown();};

void SeekHandlerTest::SetUpTestCase() {}

void SeekHandlerTest::TearDownTestCase() {}

void SeekHandlerTest::SetUp() {
    seekService_ = SleSeekService::GetInstance();
}

void SeekHandlerTest::TearDown() {}

HWTEST_F(SeekHandlerTest, StartSeekTest, TestSize.Level1)
{
    SleSeekParam param = {
        .addrType = SLE_PUBLIC_ADDRESS_TYPE,
        .repateFilter = DEFAULT_SLE_SEEK_REPATE_FILTER,
        .filterPolicy = DEFAULT_SLE_SEEK_FILTER_POLICY,
        .phys = DEFAULT_SLE_SEEK_PHYS,
        .type[0] = DEFAULT_SLE_SEEK_TYPE,
        .interval[0] = DEFAULT_SLE_SEEK_INTERVAL,
        .window[0] = DEFAULT_SLE_SEEK_INTERVAL,
    };
    SeekParam params(param);
    SleErrorCode ret = seekService_->StartSeek(params);
    EXPECT_EQ(ret, SLE_ERR_FAILED);
}

HWTEST_F(SeekHandlerTest, StopSeekTest, TestSize.Level1)
{
    SleErrorCode ret = seekService_->StopSeek();
    EXPECT_EQ(ret, SLE_ERR_FAILED);
}
}
} // namespace NetManagerStandard
} // namespace OHOS